/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */ 

package Supermarket;


import Model.ExternalDBManager;
import Model.InternalDBManager;
import javax.swing.JFrame;

/**
 * 
 * @author Manolis
 */
public class SuperMarket {
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       
        
        InternalDBManager dbmanager = new InternalDBManager();
        ExternalDBManager exdbManager = new ExternalDBManager();
        LoginUser loginUser;
        
       
        LoginForm loginForm = new LoginForm(null,true);
        loginForm.setVisible(true);;
        loginUser = loginForm.getLoginData();
        loginForm.dispose();
        
        if (loginUser.getUserType().equals("Administrator")){
            MainForm AdminMenu = new MainForm(loginUser);
            AdminMenu.setVisible(true);
            AdminMenu.setExtendedState(JFrame.MAXIMIZED_BOTH);
        }else if (loginUser.getUserType().equals("Customer")){
            MainForm2 customerMenu = new MainForm2(loginUser);
            customerMenu.setVisible(true);
            customerMenu.setExtendedState(JFrame.MAXIMIZED_BOTH);
        } 
    }
    
}
